<template>
	<view class="page">
		<view class="content" v-html="data.glossary"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: null,
				type: null,
				data: {}
			}
		},
		onLoad(options) {
			this.id = options.id
			this.type = options.type
			this.getApiIndexData()
		},
		methods: {
			// 请求主数据
			getApiIndexData() {
				this.$api.http(
					'/sms/smsBodyPartsInfo/api/n/getOneInfoByDiseaseId',
					'GET', {
						diseaseId: this.id,
						isChild: this.type % 2 == 0 ? 1 : 0
					},
					res => {
						this.data = res.data.result
						uni.setNavigationBarTitle({
							title: this.data.diseaseName
						})
					}
				)
			},
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		.content {
			padding: 20upx;
			background-color: #FFFFFF;
		}
	}
</style>
